]> dgit.raspbian.org Git - gnome-shell.git/commit
workspace: Avoid redundant boundingBox copies in window layout
authorAndre Nijman <andre.perth.2010@gmail.com>
Mon, 8 Jun 2026 05:45:01 +0000 (13:45 +0800)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 29 Jun 2026 17:47:57 +0000 (19:47 +0200)
commit479e2ac76e034f3e80b3933c6c4c50bf04d61449
tree73326e6f1373107d588b837d7a0fde06966ff164
parent50d88d937278573c3c0931eea21884e211c87106
workspace: Avoid redundant boundingBox copies in window layout

WorkspaceLayout's allocation reads child.boundingBox four times for each
window on every frame of an overview transition. The getter returns a
fresh copy of the cached box on every access, so this is four throwaway
objects per window per frame feeding the garbage collector.

Read the box into a local once and use that. The values are identical;
only the per-frame allocations go away.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4250>
(cherry picked from commit d4b5bc781535104475fba490fccfb0dd7934c96f)
js/ui/workspace.js